import java.util.Scanner;

public class Lei {
    public static void main(String[] args) {
        Scanner sc1=new Scanner(System.in);
        String str=sc1.nextLine();
        int ch=str.lastIndexOf(' ');
        System.out.println(str.length() - ch);
    }

    public static void main1(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str=sc.nextLine();
        String[] s1=str.split(" ");
        System.out.println(s1[s1.length-1].length());
    }
}
